import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: 'Login',
            component(resolve) {
                require(['../components/Login.vue'], resolve)
            },
            hidden: true

        }, {
            path: '/home',
            name: '主页',
            component(resolve) {
                require(['../components/Home.vue'], resolve)
            },
            hidden: true,
            meta: {
                requireAuth: true
            },
            children: [{
                    path: '/workspace',
                    name: '工作区',
                    component(resolve) {
                        require(['../components/coursemanage/CourseWorkspace.vue'], resolve)
                    },
                    hidden: true
                    // /resource/delete/
                    // /resource/list?page=
                    // /resource/update
                    // /resource/add
                    // /user/getTeacherList
                    // /activity/run
                    // /activity/delete/
                    // /activity/list?page=
                    // /activity/update
                    // /activity/add
                    // /activity/url/get
                    // /period/list?page=1&size=1000
                    // /course/modifyCourse
                    // /subject/list
                    // /course/get
                },
                {
                    path: '/famous_workspace',
                    name: '工作区',
                    component(resolve) {
                        require(['../components/coursemanage/famous/FamousWorkspace.vue'], resolve)
                    },
                    hidden: true
                    // /resource/delete/
                    // /resource/list?page=
                    // /resource/update
                    // /resource/add
                    // /user/getTeacherList
                    // /activity/delete/
                    // /activity/list?page=
                    // /activity/update
                    // /activity/add
                    // /course/modifyCourse
                    // /grade/list
                    // /course/get
                },
                {
                    path: '/xiti/shopsList',
                    name: '习题分类',
                    component(resolve) {
                        require(['../components/xiti/goodsList.vue'], resolve)
                    },
                    hidden: true

                    // /shop/cate/delete
                    // /shop/cate/list?pageNo=
                    // /shop/cate/update
                    // /shop/cate/save
                },
                {
                    path: '/quiz/select/list',
                    name: '题库管理',
                    component(resolve) {
                        require(['../components/TiType/SelectList.vue'], resolve)
                    },
                    hidden: true
                    // 习题管理
                    // /back/shorehouse/queryShoreHouseList
                    // /back/practicestores/importPractice
                    // /back/class/queryPracticeClassList?pageNo=
                    // /comm/queryCategoryByType
                },
                {
                    path: '/Daily/new',
                    name: '每日一练详情',
                    component(resolve) {
                        require(['../components/DailyExecise/DailyNew.vue'], resolve)
                    },
                    hidden: true
                    // 练习管理
                    // back/practicestores/queryPracticeList
                },

                {
                    path: '/Zhang/new',
                    name: '类别详情',
                    component(resolve) {
                        require(['../components/DailyExecise/ZhangNew.vue'], resolve)
                    },
                    hidden: true

                    // /back/class/queryPracticeClassList?pageNo=
                    // /comm/queryCategoryByType
                    // /back/practicetest/getPracticeTest?testId=
                    // /back/practicestores/queryPracticeList
                    // /back/practicetest/queryPracticeTestList
                },
                {
                    path: '/Xiaojie',
                    name: '小节列表',
                    component(resolve) {
                        require(['../components/DailyExecise/Xiaojie.vue'], resolve)
                    },
                    hidden: true

                    // /comm/queryCategoryByType
                    // /back/practicestores/importPractice/1
                    // /back/unit/delete?ids=
                    // /back/practicestores/addPracticeStoreList
                    // /back/chapter/getById?chapterId=
                    // /back/practicestores/queryPracticeList
                },
                {
                    path: '/tilist',
                    name: '小节列表',
                    component(resolve) {
                        require(['../components/DailyExecise/Tilist.vue'], resolve)
                    },
                    hidden: true
                    // /back/practicestores/queryPracticeList
                },
                {
                    path: '/shijuaninfo',
                    name: '小节列表',
                    component(resolve) {
                        require(['../components/DailyExecise/shijuaninfo.vue'], resolve)
                    },
                    hidden: true
                    // 习题管理
                    // /back/practicestores/importPractice/0
                    // /back/practicestores/queryPracticeList
                },
                {
                    path: '/Exam/new',
                    name: '考试详情',
                    component(resolve) {
                        require(['../components/ExamExecise/ExamNew.vue'], resolve)
                    },
                    hidden: true
                    // /back/practiceexams/getPracticeExam?examId=
                },
                {
                    path: '/post/new',
                    name: '新建文章',
                    component(resolve) {
                        require(['../components/metadata/PostNew.vue'], resolve)
                    },
                    hidden: true
                    // /post/list/add
                },
                {
                    path: '/post/edit',
                    name: '编辑文章',
                    component(resolve) {
                        require(['../components/metadata/PostEdit.vue'], resolve)
                    },
                    hidden: true
                    // /post/list/get
                    // /post/list/update
                },

                {
                    path: '/shop/goodsList',
                    name: '商品分类',
                    component(resolve) {
                        require(['../components/Shop/goodsList.vue'], resolve)
                    },
                    hidden: true
                    // 商城管理
                    // /shop/cate/delete
                    // /shop/cate/list?pageNo=
                    // /shop/cate/update
                    // /shop/cate/save
                },
                {
                    path: '/shop/xitiList',
                    name: '习题分类',
                    component(resolve) {
                        require(['../components/Shop/xitiList.vue'], resolve)
                    },
                    hidden: true
                    //分类管理
                    // /back/class/delete
                    // /back/class/delete
                    // /back/class/queryPracticeClassList?pageNo=
                },
                {
                    path: '/shijuan',
                    name: '试卷管理',
                    component(resolve) {
                        require(['../components/Shop/shijuan.vue'], resolve)
                    },
                    hidden: true
                    // /back/testpaper/queryTestPaperList
                    // /back/practicestores/importPractice
                    // /back/class/queryPracticeClassList?pageNo=
                    // /comm/queryCategoryByType
                    // /back/testpaper/queryTestPaperList
                    // /back/testpaper/queryTestPaperList
                    // /back/testpaper/addShoreHouse
                },
                {
                    path: '/shop/goodsBanner',
                    name: '商城轮播图',
                    component(resolve) {
                        require(['../components/Shop/goodsBanner.vue'], resolve)
                    },
                    hidden: true
                    // 商城管理
                    // /shop/banner/update?id=
                    // /back/startpics/getStartPicsList
                    // /shop/banner/list?pageNo=
                    // /shop/banner/delete?ids=
                },
                {
                    path: '/shop/goods',
                    name: '商品列表',
                    component(resolve) {
                        require(['../components/Shop/goods.vue'], resolve)
                    },
                    hidden: true
                    // 商城管理
                    // /shop/goods/delete
                    // /shop/cate/list
                    // /shop/goods/list?pageNo=
                    // /shop/goods/update
                    // /shop/goods/save
                },
                {
                    path: '/shop/goodsCoupon',
                    name: '商品优惠卷',
                    component(resolve) {
                        require(['../components/Shop/goodsCoupon.vue'], resolve)
                    },
                    hidden: true
                    // /shop/cate/delete
                    // /shop/coupon/list?pageNo=
                    // /shop/cate/update
                    // /shop/cate/save
                },
                {
                    path: '/shop/chapter',
                    name: '章节管理',
                    component(resolve) {
                        require(['../components/Shop/chapter.vue'], resolve)
                    },
                    hidden: true
                    // /back/class/queryPracticeClassList
                    // /comm/queryCategoryByType
                    // /back/practicetest/getPracticeTest?testId=
                    // /back/practicestores/queryPracticeList
                    // /back/chapter/delete?ids=
                    // /back/chapter/queryPracticeChapterList
                    
                },
                {
                    path: '/shop/unit',
                    name: '小节管理',
                    component(resolve) {
                        require(['../components/Shop/unit.vue'], resolve)
                    },
                    hidden: true

                },
                {
                    path: '/shop/examAnalysis',
                    name: '试卷分析',
                    component(resolve) {
                        require(['../components/Shop/examAnalysis.vue'], resolve)
                    },
                    hidden: true
                    // 习题管理
                    // /back/practicerecords/queryExamResult?examId=

                },
                {
                    path: '/shop/xinwen',
                    name: '新闻管理',
                    component(resolve) {
                        require(['../components/Shop/Journalism.vue'], resolve)
                    },
                    hidden: true
                    // 内容管理
                    // /home/hotart/delete?ids=
                    // /home/hotart/save
                    // /home/hotart/update
                    // /home/hotart/list?pageNo=
                },
                {
                    path: '/shop/zhangjie',
                    name: '类目列表',
                    component(resolve) {
                        require(['../components/Shop/Zhangjie.vue'], resolve)
                    },
                    hidden: true
                    // 分类管理
                    // /back/unit/addPracticeUnit
                    // /back/class/queryPracticeClassList?pageNo=
                    // /comm/queryCategoryByType
                    // /back/practicetest/getPracticeTest?testId=
                    // /back/practicestores/queryPracticeList
                    // /back/practicetest/queryPracticeTestList
                },
                {
                    path: '/gongshi',
                    name: '公式列表',
                    component(resolve) {
                        require(['../components/gongshi/gongshi.vue'], resolve)
                    },
                    hidden: true
                    // 内容管理
                    // /home/formula/delete?ids=
                    // /home/formula/save
                    // /home/formula/update
                    // /home/formula/list?pageNo=
                },
                {
                    path: '/tiku',
                    name: '题库管理',
                    component(resolve) {
                        require(['../components/tiku/tiku.vue'], resolve)
                    },
                    hidden: true
                    // /back/class/queryPracticeClassList?pageNo=
                },

            ]
        },

    ]
})